﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Cloud.Model;
using Cloud.BLL;
public partial class Three_Managerment_P0401_P_bj : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (IsPostBack)
        {

        }
        else
        {
            try
            {
                int id = Convert.ToInt32(Request.QueryString["id"]);
                Problem activity = ProblemManager.FindById(id);
                this.sjid.Value = activity.Appealid.ToString();
                this.times.Value = activity.Regtime.ToString();
            }
            catch (Exception ex)
            {
                Response.Write("<script>alert('登陆信息失效,请重新登陆!'); window.parent.location.href='/index.html'</script>");
                return;
            }

        }
    }

    protected void Send_Click(object sender, EventArgs e)
    {
        try
        {

            Problem_historic2 his = new Problem_historic2();
            his.Blyj = this.con.Value;

            his.Bm2 = "";

            his.Idopen = this.sjid.Value;


            his.Bm1 = ((USER_INFO)Session["users"]).DEPARTMENT;
            his.Item1 = 0;
            his.Item2 = "";
            his.Item3 = "";
            his.Name = ((USER_INFO)Session["users"]).USER_NAME;
            his.Times = DateTime.Now;
            his.Timese = new DateTime(1900, 01, 01, 00, 00, 00);
            // 04一级部门  05二级   06 三级



            int id = Convert.ToInt32(Request.QueryString["id"]);
            Problem activity = ProblemManager.FindById(id);


            activity.Handle_type =3;
            his.Evente = 8;
            his.Title = ((USER_INFO)Session["users"]).USER_NAME + "  同意办结 ";
      
            if (ProblemManager.Update(activity) > 0)
            {
                Problem_historic2Manager.Save(his);
                Response.Write("<script>alert('处理成功！');location.href='Index.aspx'</script>");
            }

        }
        catch (Exception ex)
        {
            Response.Write("<script>alert('登陆信息失效,请重新登陆!'); window.parent.location.href='/index.html'</script>");
            return;

        }
    }
}